import request from '@/utils/request'
export function selectRecommendColumnList(queryParams) {
  return request({
    url: '/publish/recommend',
    method: 'get',
    params: queryParams
  })
}
export function addRecommendColumn(data) {
  return request({
    url: '/publish/recommend',
    method: 'post',
    data: data
  })
}
export function deleteRecommendColumn(recommendId) {
  return request({
    url: `/publish/recommend/${recommendId}`, 
    method: 'delete'
  })
}
export function updateRecommendColumn(data) {
  return request({
    url: '/publish/recommend/update', 
    method: 'put',
    data: data 
  })
}

// 推荐栏目 API
export function selectChildColumn(parentId) {  
  return request({
    url: '/publish/recommend/selectChildColumn',  
    method: 'get',
     params:{parentId}
  });
}
export function selectAvailableSecondLevelColumns(parentId){
  return request ({
    url: '/publish/recommend/availableSecondLevelColumns',
    method: 'get',
    params:{parentId}
  })
}

